package com.yuhao.init.model.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 
 * @TableName wallpaper
 */
@TableName(value ="wallpaper")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class WallPaper implements Serializable {
    /**
     * 真正壁纸表
     */
    @TableId(value = "_id",type = IdType.ASSIGN_ID)
    private Long _id;

    /**
     * 壁纸分类id
     */
    @TableField(value = "classid")
    private Long classid;

    /**
     * 发布者昵称
     */
    @TableField(value = "nickname")
    private String nickname;

    /**
     * 评分
     */
    @TableField(value = "score")
    private String score;

    /**
     * webp缩略图大小，可以转换成jpg
     */
    @TableField(value = "smallPicurl")
    private String smallPicurl;

    /**
     * 标签组
     */
    @TableField(value = "tabs")
    private String tabs;

    /**
     * 壁纸描述
     */
    @TableField(value = "description")
    private String description;


    /**
     *创建时间
     */

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     *更新时间
     */

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;


    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}